home *** CD-ROM | disk | FTP | other *** search
/ The Business Master (3rd Edition) / The Business Master (3rd Edition).iso / files / cataging / collectv / install.bat < prev    next >
DOS Batch File  |  1992-01-20  |  5KB  |  186 lines

  1.     echo off
  2.     if not '%1' == '' goto nohelp
  3. :help
  4.     cls
  5.     echo If you have two floppy disk drives, you can install Collect!
  6.     echo directly onto a single disk by inserting a blank, formatted
  7.     echo disk into the drive that doesn't contain this disk and type:
  8.     echo.
  9.     echo      INSTALL A:
  10.     echo.
  11.     echo If the blank disk is in drive A, or:
  12.     echo.
  13.     echo      INSTALL B:
  14.     echo.
  15.     echo If the blank disk is in drive B.
  16.     echo.
  17.     echo.
  18.     echo To install Collect! on a hard disk, type:
  19.     echo.
  20.     echo        INSTALL x:
  21.     echo.
  22.     echo Where "x" is the letter of the hard disk (C-J).  A subdirectory will be
  23.     echo created on your hard disk to hold the Collect! files.  The default
  24.     echo name of this subdirectory is "\collect".  To specify a different name,
  25.     echo enter it on the command line following the drive letter.  For example:
  26.     echo.
  27.     echo      INSTALL C: \coll    (The space between C: and \coll is required!)
  28.     goto realend
  29. :nohelp
  30.     cls
  31.     echo.
  32.     echo INSTALLING %1 %2
  33.     echo.
  34.     echo Collect! Installation Batch Program
  35.     echo.
  36.     if %1 == a: goto floppy
  37.     if %1 == A: goto floppy
  38.     if %1 == b: goto floppy
  39.     if %1 == B: goto floppy
  40.     if %1 == c: goto hard
  41.     if %1 == C: goto hard
  42.     if %1 == d: goto hard
  43.     if %1 == D: goto hard
  44.     if %1 == e: goto hard
  45.     if %1 == E: goto hard
  46.     if %1 == f: goto hard
  47.     if %1 == F: goto hard
  48.     if %1 == g: goto hard
  49.     if %1 == G: goto hard
  50.     if %1 == h: goto hard
  51.     if %1 == H: goto hard
  52.     if %1 == i: goto hard
  53.     if %1 == I: goto hard
  54.     if %1 == j: goto hard
  55.     if %1 == J: goto hard
  56. :badparm
  57.     echo     * YOU HAVE TYPED INVALID PARAMETERS *
  58.     echo.
  59.     echo     The letter of the drive on which to install
  60.     echo     Collect! must be in the range of A through J.
  61.     echo     You must type a colon after the drive letter.
  62.     echo.
  63.     echo     If you wish to specify a hard disk sub-directory other than "\collect",
  64.     echo     you must type a space between the drive letter and the directory name.
  65.     echo.
  66.     echo     Remember too that if you specify a directory name without a leading
  67.     echo     backslash, the sub-directory will be created inside the specified
  68.     echo     drive's current directory.
  69.     echo.
  70.     pause
  71.     goto help
  72. :hard
  73.     if not '%2' == '' goto custom
  74. :default
  75.     if not exist %1\collect goto mk_defl
  76.     echo      A FILE CALLED "%1\collect" ALREADY EXISTS!
  77.     echo.
  78.     echo     Please delete "%1\collect" or specify a
  79.     echo     different sub-directory name and try again.
  80.     goto end
  81. :mk_defl
  82.     echo A sub-directory called %1\COLLECT will be created,
  83.     echo and the Collect! files will be copied into it.
  84.     echo.
  85.     echo To cancel installation at any time,
  86.     echo hold down the [Ctrl] key and press [C].
  87.     echo.
  88.     pause
  89.     echo.
  90.     echo Creating %1\COLLECT ...
  91.     md %1\COLLECT
  92.     echo.
  93.     echo Copying the program ...
  94.     echo.
  95.     copy collect!.exe %1\collect
  96.     if not exist %1\collect\collect!.EXE goto diskfull
  97.     copy *.* %1\collect > NUL
  98.     echo.
  99.     echo All Done!
  100.     echo.
  101.     echo To run Collect!, type:
  102.     echo.
  103.     echo        %1
  104.     echo        CD \COLLECT
  105.     goto done
  106. :custom
  107.     if not exist %1%2 goto mk_cust
  108.     echo     * A FILE CALLED "%1%2" ALREADY EXISTS *
  109.     echo.
  110.     echo     Please delete "%1%2" or choose a
  111.     echo     different sub-directory name and try again.
  112.     goto end
  113. :mk_cust
  114.     echo A sub-directory called %1%2 will be created.
  115.     echo The Collect! files will be copied into it.
  116.     echo.
  117.     echo To cancel installation at any time,
  118.     echo hold down the [Ctrl] key and press [C].
  119.     echo.
  120.     pause
  121.     echo.
  122.     echo Creating %1%2 ...
  123.     md %1%2
  124.     echo.
  125.     echo Copying the program ...
  126.     echo COLLECT!.EXE
  127.     copy COLLECT!.EXE %1%2 > NUL
  128.     if not exist %1%2\COLLECT!.EXE goto diskfull
  129.     echo Copying Support Files ...
  130.     copy *.* %1%2 > NUL
  131.     echo.
  132.     echo All Done!
  133.     echo.
  134.     echo To run Collect!, type:
  135.     echo.
  136.     echo        %1
  137.     echo        CD %2
  138.     goto done
  139. :floppy
  140.     if '%2' == '' goto floppyok
  141. :nosubdir
  142.     echo     * YOU HAVE TYPED AN UNEXPECTED SECOND PARAMETER *
  143.     echo.
  144.     echo     You may not install Collect! in a
  145.     echo     sub-directory of a floppy disk.
  146.     echo.
  147.     pause
  148.     goto help
  149. :floppyok
  150.     echo All files on the floppy disk in drive %1 will be erased.
  151.     echo The Collect! files will be copied onto it.
  152.     echo.
  153.     echo If you do NOT want this disk erased,
  154.     echo or to cancel installation at any time,
  155.     echo hold down the [Ctrl] key and press [C].
  156.     echo.
  157.     pause
  158.     echo.
  159.     echo Erasing the floppy disk:
  160.     del %1\*.*
  161.     echo.
  162.     echo Copying the program ...
  163.     copy *.* %1 > NUL
  164.     echo.
  165.     echo All Done!
  166.     echo.
  167.     echo To run Collect!, type:
  168.     echo.
  169.     echo.        %1
  170. :done
  171.     echo        Collect!
  172.     goto end
  173. :diskfull
  174.     echo.
  175.     echo.
  176.     echo Installation was NOT successful.
  177.     echo The disk %1 does not exist or is too
  178.     echo full to hold Collect!'s files.
  179.     echo.
  180.     echo Please free up at least 360K on %1 or
  181.     echo install Collect! on a different disk.
  182.     echo.
  183. :end
  184.     echo.
  185. :realend
  186.